import 'package:app/api/api.dart';
import 'package:get/get.dart';

class VideoControllerGetx extends GetxController {
  final ApiRepository apiRepository;
  VideoControllerGetx({required this.apiRepository});

  Future getVideos() async {
    var res = await apiRepository.getVideos();

    if (res!.data.length > 0) {
      return res.data;
    } else {
      return [];
    }
  }
}
